
import request from '@/utils/request';

// 查询列表
export async function queryRule(params) {
  return request('/b/desensrule/queryPageList', {
    method: 'POST',
    data: params,
  });
}
// 新增
export async function addRule(params) {
  return request('/b/desensrule/add', {
    method: 'POST',
    data: params,
  });
}

// 删除
export async function removeRule(params) {
  return request('/b/desensrule/delete', {
    method: 'POST',
    data: params,
  });
}

// 修改
export async function updateRule(params) {
  return request('/b/desensrule/update', {
    method: 'POST',
    data: params,
  });
}


// 匹配内容+匹配规则  点击匹配  得出匹配结果
export async function getMatching(params) {
  return request('/b/desensrule/getMatching', {
    method: 'POST',
    data: params,
  });
}

// 替换正则+匹配结果 = 分组结果
export async function getGrouping(params) {
  return request('/b/desensrule/getGrouping', {
    method: 'POST',
    data: params,
  });
}

// 匹配内容+分组列表，逗号隔开+正则+替换正则 = 结果
export async function getValidating(params) {
  return request('/b/desensrule/getValidating', {
    method: 'POST',
    data: params,
  });
}
